home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Software Contest 3
/
FM Towns Software Contest 3.iso
/
exp
/
video_t
/
no1
/
c_sorse
/
vol2.c
< prev
next >
Wrap
Text File
|
1994-01-07
|
4KB
|
142 lines
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <winb.h>
#include <te.h>
#include <fntb.h>
#include <gui.h>
int Dialog_vol = -1 ;
int Message_vol = -1 ;
int TIcon_vol[4] = -1 ;
int _001Message_vol = -1 ;
int _002Message_vol = -1 ;
int _003Message_vol = -1 ;
int _004Message_vol = -1 ;
int NumBox_voll = -1 ;
int NumBox_volr = -1 ;
int _005Message_vol = -1 ;
int _006Message_vol = -1 ;
int DButton_vol = -1 ;
int _001DButton_vol = -1 ;
int _007Message_vol = -1 ;
int _008Message_vol = -1 ;
extern int backid ;
extern int Dia_edit ;
extern int Dialog_menu ;
extern int Text ;
int radiovol = 0 ;
/* initDataVOL:TIcon_vol[0]:MJ_TICONL40の呼び出し関数 */
/* initDataVOL:TIcon_vol[1]:MJ_TICONL40の呼び出し関数 */
/* initDataVOL:TIcon_vol[2]:MJ_TICONL40の呼び出し関数 */
/* initDataVOL:TIcon_vol[3]:MJ_TICONL40の呼び出し関数 */
int vol(kobj, messId, argc, pev, trigger)
int kobj ;
int messId ;
int argc ;
EVENT *pev ;
int trigger ;
{
/* 現在選択状態にあるボタンを非選択状態にし、選択可にします */
MTL_resetFlagObj(radiovol,~(MS_UNSELECT | MS_TOGGLE)) ;
MMI_SendMessage(radiovol, MM_SHOW, 0) ;
/* 画面選択フラグを更新します */
radiovol = kobj ;
/* 呼び出し元トグルボタンを選択状態にし、選択不可にします */
MTL_setFlagObj(kobj, MS_UNSELECT | MS_TOGGLE) ;
MMI_SendMessage(kobj, MM_SHOW, 0) ;
return NOERR ;
}
/* initDataVOL:DButton_vol:MJ_DBUTTONL40の呼び出し関数 */
int vol_on(kobj, messId, argc, pev, trigger)
int kobj ;
int messId ;
int argc ;
EVENT *pev ;
int trigger ;
{
int iii;
char comnd[200]="\0";
int min, max, delta, ptColum ;
int delay0;
int delay1;
char suu[10];
/* 各設定値の読み取り */
for (iii = 0 ; iii < 4 ; iii++)
{
if (TIcon_vol[iii] == radiovol) break ;
}
if(iii != 4)
{
switch (iii)
{
case 0: strcat(comnd,"/VOL 0 "); break;
case 1: strcat(comnd,"/VOL 1 "); break;
case 2: strcat(comnd,"/VOL 2 "); break;
case 3: strcat(comnd,"/VOL 3 "); break;
}
MMI_SendMessage(NumBox_voll, MM_GETNUMBOX, 5,
&delay0, &min, &max, &delta, &ptColum) ;
MMI_SendMessage(NumBox_volr, MM_GETNUMBOX, 5,
&delay1, &min, &max, &delta, &ptColum) ;
_itoa(delay0,suu,10);
strcat(comnd,suu);
strcat(comnd," ");
_itoa(delay1,suu,10);
strcat(comnd,suu);
MMI_SendMessage(Text,MM_SETTEXT,3,comnd,200,TRUE) ;
MMI_SendMessage(Text,MM_SETTEXT,3,"\n",5,TRUE) ;
MMI_SendMessage(Dialog_vol,MM_ERASE,0) ;
MMI_SendMessage(Dialog_vol,MM_DETACH,0) ;
MMI_SendMessage(Text, MM_ERASE, 0) ;
MMI_SendMessage(Text, MM_WAKE, 0) ;
MMI_SendMessage(Text, MM_SHOW, 0) ;
/* メニューを選択可とします。 */
MTL_resetAtrObj(Dialog_menu, ~MS_DSPONLYL40) ;
MTL_resetAtrObj(Dia_edit, ~MS_DSPONLYL40) ;
MTL_resetAtrObj(backid, ~MS_DSPONLYL40) ;
}
return NOERR ;
}
/* initDataVOL:_001DButton_vol:MJ_DBUTTONL40の呼び出し関数 */
int vol_off(kobj, messId, argc, pev, trigger)
int kobj ;
int messId ;
int argc ;
EVENT *pev ;
int trigger ;
{
MMI_SendMessage(Dialog_vol,MM_ERASE,0) ;
MMI_SendMessage(Dialog_vol,MM_DETACH,0) ;
/* メニューを選択可とします。 */
MTL_resetAtrObj(Dialog_menu, ~MS_DSPONLYL40) ;
MTL_resetAtrObj(Dia_edit, ~MS_DSPONLYL40) ;
MTL_resetAtrObj(backid, ~MS_DSPONLYL40) ;
MMI_SendMessage(Text, MM_SHOW, 0) ;
MMI_SendMessage(Text, MM_WAKE, 0) ;
return NOERR ;
}
int l_vol()
{
/* 背景を選択不可とします。*/
MTL_setAtrObj(backid, MS_DSPONLYL40) ;
MTL_setAtrObj(Dialog_menu, MS_DSPONLYL40) ;
MTL_setAtrObj(Dia_edit, MS_DSPONLYL40) ;
MMI_SendMessage(Dialog_vol,MM_ATTACH,1,MMI_GetBaseObj()) ;
MMI_SendMessage(Dialog_vol, MM_SHOW, 0) ;
return NOERR ;
}